<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/templates/template_admin.xhtml">
        <ui:define name="content">
            <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>       
                        <h1><h:outputText value="List"/></h1>
                        <p:dataTable value="#{hrmb.cvList()}" var="cv">
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Cvid"/>
                                </f:facet>
                                <h:outputText value="#{cv.cvid}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="VacancyID"/>
                                </f:facet>
                                <h:outputText value="#{cv.vacancyID.title}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="ApplicantID"/>
                                </f:facet>
                                <h:outputText value="#{cv.applicantID.firstName} #{cv.applicantID.lastName}"/>
                            </p:column>
                            <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Action"/>
                                    </f:facet>
                                <h:commandLink value="View" action="#{hrmb.cvView(cv)}"/><br/>
                                <h:commandLink value="Edit" action="#{hrmb.cvEdit(cv)}"/><br/>
                                </p:column>
                        </p:dataTable>
                        <p:commandButton action="CreateCv" value="New Create"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
